//
//  VideoCustomCollectionViewCell.m
//  SYiDaiy
//
//  Created by dllo on 16/8/29.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "VideoCustomCollectionViewCell.h"
#import "UIView+ImageView.h"
#import "TAMacro.h"
#import "UIView+Label.h"
@implementation VideoCustomCollectionViewCell



- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        _cover_thumb_hdImageView = [[UIImageView alloc] creatImageViewWithFrame:CGRectZero backgroudColor:[UIColor whiteColor]];
        _titleLabel = [[UILabel alloc] creatLabelWithFrame:CGRectZero tintColor:[UIColor blueColor] font:[UIFont systemFontOfSize:15]];
        _pubdateLabel = [[UILabel alloc] creatLabelWithFrame:CGRectZero tintColor:[UIColor orangeColor] font:[UIFont systemFontOfSize:13]];
        _pubdateLabel.textColor = [UIColor blackColor];
        _pubdateLabel.alpha = 0.5;
        [self.contentView addSubview:_titleLabel];
        [self.contentView addSubview:_cover_thumb_hdImageView];
        [self.contentView addSubview:_pubdateLabel];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    CGFloat imageWidth = (SCREEN_WIDTH - 15) / 2;
    CGFloat imageHeight = (SCREEN_WIDTH - 15) / 3;
    _cover_thumb_hdImageView.frame = CGRectMake(0, 0, imageWidth, imageHeight);
    _titleLabel.frame = CGRectMake(0, imageHeight, imageWidth, imageHeight / 3);
    _titleLabel.numberOfLines = 0;
    _pubdateLabel.frame = CGRectMake(0, imageHeight * 4 / 3, imageWidth, imageHeight / 6);
}

- (void)awakeFromNib {
    // Initialization code
}

@end
